3.25 \(\int \frac{c-c \sec (e+f x)}{(a+a \sec (e+f x))^2} \, dx\)

Optimal. Leaf size=61 \[ -\frac{5 c \tan (e+f x)}{3 a^2 f (\sec (e+f x)+1)}-\frac{2 c \tan (e+f x)}{3 a^2 f (\sec (e+f x)+1)^2}+\frac{c x}{a^2} \]

[Out]

(c*x)/a^2 - (2*c*Tan[e + f*x])/(3*a^2*f*(1 + Sec[e + f*x])^2) - (5*c*Tan[e + f*x])/(3*a^2*f*(1 + Sec[e + f*x])
)

________________________________________________________________________________________

Rubi [A]  time = 0.145132, antiderivative size = 61, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 5, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.208, Rules used = {3903, 3777, 3919, 3794, 3796} \[ -\frac{5 c \tan (e+f x)}{3 a^2 f (\sec (e+f x)+1)}-\frac{2 c \tan (e+f x)}{3 a^2 f (\sec (e+f x)+1)^2}+\frac{c x}{a^2} \]

Antiderivative was successfully verified.

[In]

Int[(c - c*Sec[e + f*x])/(a + a*Sec[e + f*x])^2,x]

[Out]

(c*x)/a^2 - (2*c*Tan[e + f*x])/(3*a^2*f*(1 + Sec[e + f*x])^2) - (5*c*Tan[e + f*x])/(3*a^2*f*(1 + Sec[e + f*x])
)

Rule 3903

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.)*(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_))^(n_), x_Symbol] :> Dis
t[c^n, Int[ExpandTrig[(1 + (d*csc[e + f*x])/c)^n, (a + b*csc[e + f*x])^m, x], x], x] /; FreeQ[{a, b, c, d, e,
f, n}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && IGtQ[m, 0] && ILtQ[n, 0] && LtQ[m + n, 2]

Rule 3777

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n_), x_Symbol] :> -Simp[(Cot[c + d*x]*(a + b*Csc[c + d*x])^n)/(d*(
2*n + 1)), x] + Dist[1/(a^2*(2*n + 1)), Int[(a + b*Csc[c + d*x])^(n + 1)*(a*(2*n + 1) - b*(n + 1)*Csc[c + d*x]
), x], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0] && LeQ[n, -1] && IntegerQ[2*n]

Rule 3919

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_))/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Simp[(c*x)/a,
x] - Dist[(b*c - a*d)/a, Int[Csc[e + f*x]/(a + b*Csc[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[
b*c - a*d, 0]

Rule 3794

Int[csc[(e_.) + (f_.)*(x_)]/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> -Simp[Cot[e + f*x]/(f*(b + a*
Csc[e + f*x])), x] /; FreeQ[{a, b, e, f}, x] && EqQ[a^2 - b^2, 0]

Rule 3796

Int[csc[(e_.) + (f_.)*(x_)]*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> Simp[(b*Cot[e + f*x]*(a
+ b*Csc[e + f*x])^m)/(a*f*(2*m + 1)), x] + Dist[(m + 1)/(a*(2*m + 1)), Int[Csc[e + f*x]*(a + b*Csc[e + f*x])^(
m + 1), x], x] /; FreeQ[{a, b, e, f}, x] && EqQ[a^2 - b^2, 0] && LtQ[m, -2^(-1)] && IntegerQ[2*m]

Rubi steps

\begin{align*} \int \frac{c-c \sec (e+f x)}{(a+a \sec (e+f x))^2} \, dx &=\frac{\int \left (\frac{c}{(1+\sec (e+f x))^2}-\frac{c \sec (e+f x)}{(1+\sec (e+f x))^2}\right ) \, dx}{a^2}\\ &=\frac{c \int \frac{1}{(1+\sec (e+f x))^2} \, dx}{a^2}-\frac{c \int \frac{\sec (e+f x)}{(1+\sec (e+f x))^2} \, dx}{a^2}\\ &=-\frac{2 c \tan (e+f x)}{3 a^2 f (1+\sec (e+f x))^2}-\frac{c \int \frac{-3+\sec (e+f x)}{1+\sec (e+f x)} \, dx}{3 a^2}-\frac{c \int \frac{\sec (e+f x)}{1+\sec (e+f x)} \, dx}{3 a^2}\\ &=\frac{c x}{a^2}-\frac{2 c \tan (e+f x)}{3 a^2 f (1+\sec (e+f x))^2}-\frac{c \tan (e+f x)}{3 a^2 f (1+\sec (e+f x))}-\frac{(4 c) \int \frac{\sec (e+f x)}{1+\sec (e+f x)} \, dx}{3 a^2}\\ &=\frac{c x}{a^2}-\frac{2 c \tan (e+f x)}{3 a^2 f (1+\sec (e+f x))^2}-\frac{5 c \tan (e+f x)}{3 a^2 f (1+\sec (e+f x))}\\ \end{align*}

Mathematica [A]  time = 0.313902, size = 113, normalized size = 1.85 \[ \frac{c \sec \left (\frac{e}{2}\right ) \sec ^3\left (\frac{1}{2} (e+f x)\right ) \left (18 \sin \left (e+\frac{f x}{2}\right )-14 \sin \left (e+\frac{3 f x}{2}\right )+9 f x \cos \left (e+\frac{f x}{2}\right )+3 f x \cos \left (e+\frac{3 f x}{2}\right )+3 f x \cos \left (2 e+\frac{3 f x}{2}\right )-24 \sin \left (\frac{f x}{2}\right )+9 f x \cos \left (\frac{f x}{2}\right )\right )}{24 a^2 f} \]

Antiderivative was successfully verified.

[In]

Integrate[(c - c*Sec[e + f*x])/(a + a*Sec[e + f*x])^2,x]

[Out]

(c*Sec[e/2]*Sec[(e + f*x)/2]^3*(9*f*x*Cos[(f*x)/2] + 9*f*x*Cos[e + (f*x)/2] + 3*f*x*Cos[e + (3*f*x)/2] + 3*f*x
*Cos[2*e + (3*f*x)/2] - 24*Sin[(f*x)/2] + 18*Sin[e + (f*x)/2] - 14*Sin[e + (3*f*x)/2]))/(24*a^2*f)

________________________________________________________________________________________

Maple [A]  time = 0.08, size = 59, normalized size = 1. \begin{align*}{\frac{c}{3\,f{a}^{2}} \left ( \tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) \right ) ^{3}}-2\,{\frac{c\tan \left ( 1/2\,fx+e/2 \right ) }{f{a}^{2}}}+2\,{\frac{c\arctan \left ( \tan \left ( 1/2\,fx+e/2 \right ) \right ) }{f{a}^{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c-c*sec(f*x+e))/(a+a*sec(f*x+e))^2,x)

[Out]

1/3/f*c/a^2*tan(1/2*f*x+1/2*e)^3-2/f*c/a^2*tan(1/2*f*x+1/2*e)+2/f*c/a^2*arctan(tan(1/2*f*x+1/2*e))

________________________________________________________________________________________

Maxima [B]  time = 1.54762, size = 161, normalized size = 2.64 \begin{align*} -\frac{c{\left (\frac{\frac{9 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - \frac{\sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}}}{a^{2}} - \frac{12 \, \arctan \left (\frac{\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )}{a^{2}}\right )} + \frac{c{\left (\frac{3 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - \frac{\sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}}\right )}}{a^{2}}}{6 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c-c*sec(f*x+e))/(a+a*sec(f*x+e))^2,x, algorithm="maxima")

[Out]

-1/6*(c*((9*sin(f*x + e)/(cos(f*x + e) + 1) - sin(f*x + e)^3/(cos(f*x + e) + 1)^3)/a^2 - 12*arctan(sin(f*x + e
)/(cos(f*x + e) + 1))/a^2) + c*(3*sin(f*x + e)/(cos(f*x + e) + 1) - sin(f*x + e)^3/(cos(f*x + e) + 1)^3)/a^2)/
f

________________________________________________________________________________________

Fricas [A]  time = 1.02543, size = 212, normalized size = 3.48 \begin{align*} \frac{3 \, c f x \cos \left (f x + e\right )^{2} + 6 \, c f x \cos \left (f x + e\right ) + 3 \, c f x -{\left (7 \, c \cos \left (f x + e\right ) + 5 \, c\right )} \sin \left (f x + e\right )}{3 \,{\left (a^{2} f \cos \left (f x + e\right )^{2} + 2 \, a^{2} f \cos \left (f x + e\right ) + a^{2} f\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c-c*sec(f*x+e))/(a+a*sec(f*x+e))^2,x, algorithm="fricas")

[Out]

1/3*(3*c*f*x*cos(f*x + e)^2 + 6*c*f*x*cos(f*x + e) + 3*c*f*x - (7*c*cos(f*x + e) + 5*c)*sin(f*x + e))/(a^2*f*c
os(f*x + e)^2 + 2*a^2*f*cos(f*x + e) + a^2*f)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} - \frac{c \left (\int \frac{\sec{\left (e + f x \right )}}{\sec ^{2}{\left (e + f x \right )} + 2 \sec{\left (e + f x \right )} + 1}\, dx + \int - \frac{1}{\sec ^{2}{\left (e + f x \right )} + 2 \sec{\left (e + f x \right )} + 1}\, dx\right )}{a^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c-c*sec(f*x+e))/(a+a*sec(f*x+e))**2,x)

[Out]

-c*(Integral(sec(e + f*x)/(sec(e + f*x)**2 + 2*sec(e + f*x) + 1), x) + Integral(-1/(sec(e + f*x)**2 + 2*sec(e
+ f*x) + 1), x))/a**2

________________________________________________________________________________________

Giac [A]  time = 1.42365, size = 76, normalized size = 1.25 \begin{align*} \frac{\frac{3 \,{\left (f x + e\right )} c}{a^{2}} + \frac{a^{4} c \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} - 6 \, a^{4} c \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )}{a^{6}}}{3 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c-c*sec(f*x+e))/(a+a*sec(f*x+e))^2,x, algorithm="giac")

[Out]

1/3*(3*(f*x + e)*c/a^2 + (a^4*c*tan(1/2*f*x + 1/2*e)^3 - 6*a^4*c*tan(1/2*f*x + 1/2*e))/a^6)/f